home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rat Attack (UK) (Digital Press Kit - Summer '99)
/
Rat Attack (UK) (Digital Press Kit - Summer '99).bin
/
RAT01.DIR
/
00138_Script_Random Sound
< prev
next >
Wrap
Text File
|
1999-04-26
|
2KB
|
75 lines
-- Random Sound Play Member
-- also functions through lingo by handling message 'initPlayMember',
-- for example if this behavior was assigned to sprite 5, use
-- sendsprite 5, #initPlayMember
-- Media
property WhichEvent, WhichSound, WhichChannel, StartImmediately
property tester
on initPlayMember me
init me
end
on mouseUp me
if whichEvent = #mouseup then init me
end
on mouseDown me
if whichEvent = #mousedown then init me
end
on prepareFrame me
if whichEvent = #prepareframe then init me
end
on enterFrame me
if whichEvent = #enterframe then init me
end
on exitFrame me
if whichEvent = #exitframe then init me
end
on init me
doSound
global mySound
puppetSound the WhichChannel of me, mySound -- the whichSound of me
if the StartImmediately of me then updatestage
end
---
on getPropertyDescriptionList
set p_list = [ ¼
#WhichSound: [ #comment: "Sound:", ¼
#format: #sound, ¼
#default: "clik" ], ¼
#WhichChannel: [ #comment: "Channel:", ¼
#format: #integer, ¼
#default: 1 ], ¼
#WhichEvent: [ #comment: "Initializing Event:", ¼
#format: #symbol, ¼
#range: [ #MouseUp, #MouseDown, #PrepareFrame, #EnterFrame, #ExitFrame, #InitPlayMember ], ¼
#default: #MouseDown ]¼
]
return p_list
end
on getBehaviorDescription
return ¼
"Plays a random sound calling doSound in Movie Script when the specified event occurs, or when the message ." & RETURN & ¼
"PARAMETERS:" & RETURN & ¼
"ò Sound - Choose the sound cast member to be played." & RETURN & ¼
"ò Channel - Enter the sound channel number to be used for playback." & RETURN & ¼
"ò Initializing Event - Specify the event that triggers the behavior."
end